This is "Metafont Help", help file for the Metafont Mode 1.0. 
For Alpha to find it, you must move this file to the "Help" folder 
located at the same level as the Alpha application itself.


Author :  Bernard Desgraupes  
File "Metafont Help" created: 04/02/99  last modified : 04/28/99
e-mail:  berdesg@easynet.fr
www: <http://perso.easynet.fr/~berdesg/metafont.html>


###############################
#  Metafont Support in Alpha  #
###############################


Introduction
Installation
How to use it
The "M" pop-up menu
Metafont Mode preferences
Version History


====================
Introduction
====================

MetafontMode is a mode for the text editor Alpha: it is designed to make writing, 
processing and testing of Metafont source files much easier. Metafont is 
the programming language written, as a companion to TeX, by Donald Knuth in 
order to create characters, fonts, font families (and many other things). 
Once Metafont mode is installed, the opening of a Metafont source file (i-e 
with extension ".mf") invokes a new menu (called Metafont !) in the menu bar with 
the following features :
  easy insertion of all the basic Metafont commands (with electric stops)
  syntax colorizing
  capacity to process a source file from within Alpha with various flags, printer modes, input base files
-  editing of the log file
-  capacity to make the pk file; creating and editing the property list for a font
-  processing all the source files in a folder instead of a single file
-  file marking


As of this release, only CMacTeX Metafont and OzMetafont are supported.


====================
Installation
====================


Automatic installation :

Open the "OPEN TO INSTALL" file. Opening this file indicates to Alpha that a 
new package has to be installed : the procedure is automatic. Alpha knows 
where to store the different elements of your Metafont Mode package. 

Manual installation :

1-  put the "metafontMode.tcl" file in the "Modes" subfolder of the "Tcl" 
folder which is located at the same level as your Alpha application

2-  put the "Metafont Help" file in the "Help" folder located at the same level 
as your Alpha application. Next time you launch Alpha, you will have a 
"Metafont Help" item in the Help menu to edit this file.

3-  launch Alpha. You have to rebuild the package indices and the Tcl 
ones.  'Rebuild Package Indices' is in the Config->Packages menu, and "Rebuild Tcl
Indices" is in the Tcl menu (press cmd-Y to open a tcl shell).

4-  quit Alpha and relaunch it : that's all there is to it. 

After installing : 

From now on, the opening of any file with the ".mf" extension will invoke the 
Metafont menu.
Have a look at the mode specific preferences : create or open any 
Metafont source file and choose "Preferences" in the "Current Mode" 
submenu of the "Config" menu. You can set the name of the printer mode 
corresponding to your printer, or indicate the path of the modes.mf or the 
plain.mf files. More explanations below.



==============================
Use-ing the Metafont menu :
==============================

Explanation for the Metafont menu items :

<Switch To Metafont>	Launches the Metafont application in front

<Run The Buffer>		Calls up the Metafont application and processes the 
						current window

<Save And Run>			Saves the current window and calls up the Metafont 
						application to process it.

<Run a File>			Prompts you for a "mf" file to run.

When pressing the option key <Run a File> becomes <Run a Fileset>
						Prompts you for a fileset of "mf" files to run.

<Choose Metafont Mode> 	The word mode has a different meaning for Alpha and
						for Metafont : here it means the Metafont's printer mode, the 
						one you specify when you (or Maketexpk) process a font.
						As usual with Metafont if no mode is specified, the 
						default is proof. You can choose among the following
						list. User Defined should be set in the Current
						Mode Prefs : it is the printer mode at your installation.
						If you do not know which mode corresponds to your
						installation, look in the modes.mf file which comes with your
						TeX distribution. You can edit this file directly in Alpha 
						from this Metafont Menu (see below).
	<Proof>				To make proof characters at 2602 resolution (36 pixels per 
						point). No tfm file is produced in this mode.
	<Smoke>				To make black proof characters. No tfm file 
						is produced in this mode.
	<Localfont>			Use this mode when you do not know the printer mode's 
						name of your installation : if your administrator did his 
						job well, the "localfont variable" contains the printer mode.
	<User Defined>		Comes as default as canonex : you set here what you want.
	
<Processing Options>	Define here any particular processing option allowed 
						by Metafont.
	<mag...>			Default value is 1, which means no magnification.
	<magstep...>		Default value is 0, which means no magnification
						Note that you choose a magnification either in mag or in magstep : 
						if you choose the magstep syntax, any choice you previously made 
						with mag will be omitted (and vice versa).
	<Base File...>		You can specify a particular file (a base file for instance)
						which should be input before the file you want to process. Like in
						the command line :
						mf \mode=foo ; input somebasefile.mf ; input currentwindowfile.mf
						To cancel an input file you have to clear all options (see below the 
						menu item "Clear All Options")
	<Gfcorners>			Option to draw corners at the corners of the box 
						containing each character. Works in smoke mode.
	<Imagerules>		Option to draw the box of each character.
	<Nodisplays>		Don't show the characters on the monitor : to build fonts 
						faster
	<Notransforms>		Don't calculate any transformation if currenttransform is
						identity. To run faster.
	<Screenchars>		Show each character once it has been calculated.
	<Screenstrokes>		Show each character stroke after stroke while it is calculated
	<Clear All Options>	Cancel all previous  previously selected options.

	
	
<Other Files>
	<Convert gf to pk>		Invokes gftopk to transform the "gf" file produced after 
							a run of Metafont to the "pk" (packed) format. This procedure reads in 
							the log file to find the name of the gf file (which depends on the mode 
							chosen and the mag) : if the log file is missing, it won't work.
	When pressing the option key :
	<Convert all gf to pk>	All the gf files corresponding to a fileset that 
							has been processed by Metafont are converted to pk.
	
	<Convert tfm to pl>		Invokes tftopl to transform the 'tfm" (TeX font	metrics) file produced 
							after a run of Metafont (in any mode but proof or smoke) to the "pl" 
							(property list) format and edit it. File extension will be "fpl" 
							(font property list) instead of "pl" because "pl" is the extension of 
							Perl script files and it invokes automatically the Perl menu (this 
							is not what we want).
	When pressing the option key :
	<Convert all tfm to pl>	All the tfm files corresponding to a fileset that 
							has been processed by Metafont are converted to pl.
	
	<tfm to pl...>			Prompts the user for a "tfm" file to convert to human 
							readable format	: extension of these files will be "fpl".
	<Open Log File>			Edit in Alpha (read-only) the log file corresponding to the 
							currentwindow and produced by a run of Metafont on this current 
							window.
	When pressing the option key :
	<Convert all Log Files>	All the log files corresponding to a fileset that 
							has been processed by Metafont are open.
	
	<Open Property List> 	Open the property list file related to the current 
							window (if it exists, i-e if you have already converted the tfm to pl)
	When pressing the option key :
	<Open All Property Lists> 	Opens all the Property Lists corresponding to 
								a fileset whose tfm files have been converted.			

	<Open Modes.mf>			Edit (read-only) the modes.mf file. It is the file 
							containing the printer mode definitions for allmost all
							the available printers.
	<Open Plain.mf>			Edit (read-only) the plain.mf file. It is the file 
							containing the definition of all the basic Metafont macros.
				Note : you have to set the paths to these files in the mode specific 
				preferences when you first use the Metafont Mode.
					
<New Font Template>			Builds a template for a complete new font source 
							file. User is asked for the number of characters 
							in the font.



		All the following submenus contain the basic Metafont commands and 
		macros : any item you choose will be inserted in your file at the 
		cursor's current position with electric tabs for those commands which need
		arguments. In some cases, you will be asked to enter a number (see 
		"makegrid" for instance). All the macros relevant to a particular aspect have 
		been collected together in a (supposedly) logical way:
                                    <boolean>
                                    <characters>
                                    <conditions>
                                    <debugging>
                                    <definitions>
                                    <displaying>
                                    <drawing>
                                    <font Definitions>
                                    <functions>
                                    <internal Variables>
                                    <misc>
                                    <output>
                                    <paths>
                                    <pens>
                                    <pictures>
                                    <pixellisation>
                                    <positioning>
                                    <strings>
                                    <transformations>
                                    <units>
                                    <variables>


						
============================						
The "M" pop-up menu
============================

If you choose to mark your file from the "M"  pop-up menu (top right of 
your editing window), all the def, vardef and 
beginchar declarations in your file will be marked. The beginchar command
is customizable (in the Mode Prefs) and any change you make there 
will be taken into account for marking.
If the auto mark checkbox is checked in the Prefs, the file is automatically 
marked at opening.



============================
Metafont Mode preferences
============================

The "Preferences" item in the "Current Mode" submenu of the "Config" menu allows 
you to edit specific preferences for the Metafont Mode. All of them 
should be self-explanatory.
You can specify there :
   the paths to the modes.mf and plain.mf files.
-   the name of the output folder in which to put the files produced by 
Metafont, gftopk of tftopl
-   a "User beginchar" : it is customary in Metafont's font files to modify 
the definition of the beginchar/endchar routine and to give it a different 
name : for instance "beginlogochar" in the logo.mf font or "cmchar" in 
Computer Modern fonts or whatever. You can specify here this modified name in order to 
get a correct file marking from the little "M" pop-up menu on the top right 
corner of the current window.



====================
Version History
====================


1.0b1		03/28/99	Created the Metafont Mode including the following features : 
						new Metafont menu, submenus to insert Metafont macros 
						with electric stops, syntax colorizing.

1.0b2		03/30/99	Added file marking : all the def and vardef declarations are 
						marked. All the beginchar environments are marked too 
						(beginchar can be changed by the user).

1.0b3		04/02/99	Added submenu to choose the processing options 
						(screenchars, screenstrokes etc) and the Metafont printer mode.
						Added direct editing of the modes.mf and plain.mf files. The paths
						to these files is stored in the Current Mode Prefs.

1.0b4		04/06/99	Added Apple event to have CMaCTeX process the current 
						window or any mf file. Added building of the entire command line 
						that will be sent to Metafont.

1.0b5		04/07/99	Added error messages for noncompatible options. Problems 
						of compatibility between mag and magstep resolved. Editing of the 
						property list file	(human readable translation of the tfm file)
						
1.0b6		04/08/99	Added conversion of gf file to pk file from the Metafont menu.

1.0b7		04/09/99	Improved error handling. Corrected a few bugs. 
						
1.0b8		04/15/99	Made "Other Files" submenu dynamic. Includes the name of the 
						current files and rebuilds each time it is necessary : when a window 
						is changed, when a file has been processed etc.
						
1.0b9		04/17/99	Added alternate items in the menu : when pressing the 
						option key, "Run a File" becomes "Run a Folder" etc. We can now process 
						a whole folder, convert all the processed files to pk; all the tfm 
						to pl

1.0b10		04/19/99	Added New Font Template.

1.0b11		04/21/99	Added new T. Kiffe's Apple event syntax for CMacTeX 
						Metafont to take the output folder into account.
						
1.0b12		04/27/99	Added support for OzMetafont. Since OzMetafont cannot 
						receive a complete Mf command line through an Apple event, 
						a temporary make file is created and processed by the built-in MakeTeXPk
						
1.0b13		04/29/99	Extended the "make file" technique to a complete folder. 
						Extended it to CmacTeX too. Runs much faster : the user doesn't have 
						anymore to confirm between each run of Metafont.
						
1.0b14		05/25/99	Corrected a bug concerning conversion of tfm to pl.	


1.0  		05/27/99	First public release of metafontMode (version 1.0).

1.01  		05/29/99	Corrected a minor bug for the Metafont menu to build correctly with the newly 
						released Alpha 7.2.
						
						
====================
Known problems
====================

With versions of CMacTeX Metafont older than 2.2.1, the output folder 
defaults to the folder containing the Alpha application. So don't change it 
in the mode specific preferences. This problem will be resolved in a 
future release.
So far only CMacTeX Metafont and OzMetafont are supported : I'll try to add support for
DirectTeXPro and Textures in the future.
Please e-mail any problem or bug you encounter : berdesg@easynet.fr
Visit my Metafont Web page for updates : <http://perso.easynet.fr/~berdesg/metafont.html>
